Skip to content

fidget-nvim setupOpts update#1306

Open
imnotpoz wants to merge 2 commits intoNotAShelf:mainfrom
imnotpoz:main
Open

fidget-nvim setupOpts update#1306
imnotpoz wants to merge 2 commits intoNotAShelf:mainfrom
imnotpoz:main

Conversation

@imnotpoz
Copy link
Contributor

found these in :checkhealth

Sanity Checking

  • I have updated the changelog as per my changes
  • I have tested, and self-reviewed my code
  • My changes fit guidelines found in hacking nvf
  • Style and consistency
    • I ran Alejandra to format my code (nix fmt)
    • My code conforms to the editorconfig configuration of the project
    • My changes are consistent with the rest of the codebase
  • If new changes are particularly complex:
    • My code includes comments in particularly complex areas
    • I have added a section in the manual
    • (For breaking changes) I have included a migration guide
  • Package(s) built:
    • .#nix (default package)
    • .#maximal
    • .#docs-html (manual, must build)
    • .#docs-linkcheck (optional, please build if adding links)
  • Tested on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin

Add a 👍 reaction to pull requests you find important.

@github-actions
Copy link

github-actions bot commented Dec 23, 2025

🚀 Live preview deployed from cc76be2

View it here:

Debug Information

Triggered by: imnotpoz

HEAD at: main

Reruns: 2150

Comment on lines +576 to +582
default = false;
visible = false;
apply = warn ''
Option `vim.visuals.fidget-nvim.setupOpts.integration.xcodebuild-nvim.enable`
has been deprecated upstream. Use
`vim.visuals.fidget-nvim.setupOpts.notification.window.avoid = ["TestExplorer"]` instead.
'';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct way to warn on an option. You'll want to use mkRemovedOptionModule as the rest of the codebase. Apply does work, but it's a really fragile way of doing this. Also applies to the vim.visuals.fidget-nvim.setupOpts.integration.nvim-tree.enable warning above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately not possible due to mkPluginSetupOption, see #1305

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I lied xd, this throws a warning even if the option isn't set at all. We'll have to figure something out

Copy link
Owner

@NotAShelf NotAShelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments on formatting and introduction of new options. I'd appreciate it if you could follow the "convention" for mkOption.

Also, this requires a changelog entry after v0.9. LGTM otherwise. Though CC @horriblename for the HLS changes.

@imnotpoz
Copy link
Contributor Author

Also, this requires a changelog entry after v0.9. LGTM otherwise. Though CC @horriblename for the HLS changes.

changelog for both commits? I can add it once the comments above are resolved

Copy link
Collaborator

@horriblename horriblename left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty this will trigger the deprecation warning regardless of whether the user has set this option

I think removing the default value works? (I don't remember if it allows not giving a default without one)

# see https://github.com/mrcjkb/haskell-tools.nvim/blob/v6.2.0/lua/haskell-tools/lsp/init.lua#L131-L173
# for the real ones
hls = {
enable = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my understanding, we're relying on haskell-tools to start the lsp, so we should set this to false? (enable = true, which is the default, calls vim.lsp.enable("server_name")

Copy link
Contributor Author

@imnotpoz imnotpoz Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable is one of the fields not recognized by haskell-tools, as per :checkhealth:

Checking config ~
- ✅ OK No errors found in config.
- ⚠️ WARNING unrecognized configs in vim.g.haskell_tools: { "hls.enable", "hls.root_dir", "hls.filetypes" }

in that commect I left there, lsp_start_opts use some fields from hls_opts and hls_settings, which are the ones defined by us - there's no checks on enable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just tested this on this branch, there's no warnings without enable and the LSP still works properly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm in that case we should filter out enable before toLuaObject'ing it. I can do that in a separate PR, or you can do that in this one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean adding that enable back, setting it to true so that it stays consistent with the rest, but filtering that enable when passed to toLuaObject?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enable = false should be kept, and enable should be filtered out before being passed to toLuaObject here. keep in mind that, the enable field is only used by nvf to call vim.lsp.enable('lspname'), and has no effect when passed to vim.lsp.config()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok my bad, there was another effort in fixing this already #1191

I'll read through the discussions in that again later, I kinda forgot about it.

I think it's best to just leave haskell-tools alone for now, I'll merge in the other changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repushed and removed the haskell commit

@imnotpoz
Copy link
Contributor Author

repushed with a rebase on current main

@imnotpoz
Copy link
Contributor Author

this doesn't seem to be caused by my PR I think

github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
@imnotpoz imnotpoz changed the title fidget-nvim setupOpts update and haskell-tools fixes fidget-nvim setupOpts update Feb 19, 2026
github-actions bot pushed a commit that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants